package com.globant.util.log.details;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/** 
 * Log Details RowMapper implementation.
 * 
 * @author gonzalo.zarza
 * @version 20130125v1.0
 */

public class LogDetailsRowMapper implements RowMapper {

	@Override
	public LogDetails mapRow(ResultSet rs, int rowNum) throws SQLException {
		LogDetails log = new LogDetails();
		
		log.setLogId(rs.getString("log_id"));
		log.setName(rs.getString("name"));
		log.setSize(rs.getInt("size"));
		log.setDateStart(rs.getDate("date_start"));
		log.setGeneralStatus(rs.getString("general_status"));
		log.setEfficiency(rs.getFloat("efficiency"));
		
		return log;
	}

}
